package com.ts.api.module.api.convert.receive.entity;

import com.ts.api.module.product.entity.po.ProductApplyFlowPO;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;

/**
 *  返回业务处理好的参数消息
 *
 *  @author Pan
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class ApiReceiveApply extends ApiReceive {

    /** 客户端id */
    private String apiClientId;
    /** 手机md5 */
    private String phoneMd5;
    /** 手机号码 */
    private String phone;
    /** 主体名称 */
    private String orgName;
    /** 投放名称 */
    private String displayName;
    /** 计划原价 */
    private BigDecimal price;
    /** 回调地址 */
    private String callUrl;
    /** 流程实体类 */
    private ProductApplyFlowPO ProductApplyFlowPO;
    /** 该用户是否本地存在 */
    private boolean hasLocalExist;

    public static ApiReceiveApply fail(String msg, Integer code) {
        ApiReceiveApply apiReceiveDataExchangeMessage = new ApiReceiveApply();
        apiReceiveDataExchangeMessage.setBizMsg(msg);
        apiReceiveDataExchangeMessage.setBizCode(code);
        return apiReceiveDataExchangeMessage;
    }

}
